#define _CRT_SECURE_NO_WARNINGS 1

void pare_R(Node* parent)
{
	Node* subL = parent->left;
	Node* subLR = subL->right;

	parent->left = subLR;
	subL->right = parent;
	if (subLR)
		subLR->parent = parent;
	Node* parentParet = parent->parent;

	if (_root == parent)
	{
		/*subL = parent;*/

		subL->parent = nullptr;
	}
	else
	{
		if (parentParet->left == parent)
		{
			parentParet->left = subL;
		}
		else
		{
			parentParet->right = subL;
		}
		subL->parent = parentParet;
	}
	parent->_bf = subL->_bf = 0;
}